package com.ywm.service.user.impl;

import com.ywm.model.user.User;
import com.ywm.service.user.UserService;
import com.ywm.dao.user.UserDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserServiceImpl implements UserService {

	private static Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);
	
	@Autowired
	private UserDao userDao;

	@Override
	public User getUserById(Long id) {
		return userDao.findOneById(id);
	}

	@Override
	public List<User> findList(Integer age) {
		return userDao.findUserList(age);
	}

	@Override
	public int countUser() {
		return userDao.countUser();
	}
}